# -*- coding: UTF-8 -*-
from okex.robot import OKRobot
from okex.file_log import FileLog
import sys
if __name__ == '__main__':
    robotLog = FileLog('logconfig.ini').outputLog()
    try:
        robotLog.info("start okex robot")
        client = OKRobot(ws_host="wss://real.okex.com:8443/ws/v3",
        ws_ping_interval=20,logger=robotLog)
        client.start()
        # client.join()
        client.okex_ws.stop()
        robotLog.info("运行结束")
        client.okex_ws.join()

    except KeyboardInterrupt:
        robotLog.info("Ctrl+C 已退出")
        sys.exit(0)
    
    
    